<?php


namespace app\api\service\cms;

//附件表服务类


use app\common\model\Attachment;

class AttachmentService
{
    //获取附件列表
    public function getList(array $where){
        $field = 'id,url,filename';
        $model = new Attachment();
        if (!empty($where['url'])){
            $model = $model->whereIn('url',$where['url']);
        }
        $model = $model->field($field)->select();
        if ($model){
            return $model;
        }else{
            return [];
        }
    }
}